//
//  XQSmallBetweenView.swift
//  Spark Peso
//
//  Created by 小琦 on 2025/2/3.
//

import UIKit

class XQSmallBetweenView: UIView {

    private lazy var titleLb : UILabel = {
        let lb = UILabel()
        lb.textColor = UIColor(hex: "#A3A6A9")
        lb.font = UIFont.systemFont(ofSize: 12)
        return lb
    }()
    
    private lazy var contentLb : UILabel = {
        let lb = UILabel()
        lb.textColor = .xq_black
        lb.font = UIFont.systemFont(ofSize: 12,weight: .medium)
        return lb
    }()
    
    var title : String = "" {
        didSet {
            titleLb.text = title
        }
    }
    
    var content : String = "" {
        didSet {
            contentLb.text = content
        }
    }    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        makeUI()
        makeConstraints()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        makeUI()
        makeConstraints()
    }
    
    func makeUI() {
        self.addSubview(self.titleLb)
        self.addSubview(self.contentLb)
    }
    
    func makeConstraints() {
        self.titleLb.snp.makeConstraints { make in
            make.top.left.bottom.equalTo(0)
            make.width.equalTo(125)
        }
        self.contentLb.snp.makeConstraints { make in
            make.centerY.equalTo(self.titleLb)
            make.left.equalTo(self.titleLb.snp.right)
            make.right.top.bottom.equalTo(0)
        }
    }

}
